package com.example.ball.Activity;


import android.graphics.Color;
import android.support.v4.app.Fragment;
import android.widget.RelativeLayout;


import com.example.ball.Fragment.ExchangeFragment;
import com.example.ball.Fragment.FindFragment;
import com.example.ball.Fragment.MeFragment;
import com.example.ball.Fragment.SplendidFragment;
import com.example.ball.R;
import com.sam.ui.base.activity.BaseFragmentActivity;
import com.sam.widget.button.StateBitmapImageButton;
import com.sam.widget.nav_bar.NavigationItemEntity;


/**
 * Created by Administrator on 2016/7/20.
 */
public class BasketballActivity extends BaseFragmentActivity {


    @Override
    protected void initPageInfo() {
        StateBitmapImageButton  stateBitmapImageButton=new StateBitmapImageButton(this);
        stateBitmapImageButton.setBackgroundColor(Color.TRANSPARENT);
        stateBitmapImageButton.setBackgroundResource(R.drawable.icon_center_basketball_normal);
        RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT
        ,RelativeLayout.LayoutParams.WRAP_CONTENT);
        lp.addRule(RelativeLayout.CENTER_HORIZONTAL);
        lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
        lp.bottomMargin=8;
        stateBitmapImageButton.setLayoutParams(lp);
        getLayoutView().addView(stateBitmapImageButton);


        NavigationItemEntity[] items={
                new NavigationItemEntity(BasketballActivity.this,R.string.splendid,R.drawable.icon_share_normal,R.drawable.icon_share_pressed),
                new NavigationItemEntity(BasketballActivity.this,R.string.find,R.drawable.icon_discovery_normal,R.drawable.icon_discovery_pressed),
                new NavigationItemEntity("",null,null),
                new NavigationItemEntity(BasketballActivity.this,R.string.exchange,R.drawable.icon_message_normal,R.drawable.icon_message_pressed),
                new NavigationItemEntity(BasketballActivity.this,R.string.my_circle,R.drawable.icon_me_normal,R.drawable.icon_me_pressed)

        };
        Fragment[] fragments={ SplendidFragment.getSlef(), FindFragment.getSlef(),null, ExchangeFragment.getSlef(), MeFragment.getSlef()};
        setPageInfo(items,fragments,0);
        getNavigationBar().setBackgroundResource(R.color.bg);
        getNavigationBar().setNavItemNameSpSize(14);
        getNavigationBar().setNavItemNameCheckedColor(getResources().getColor(R.color.yellow));
        getNavigationBar().setNavItemNameUncheckedColor(getResources().getColor(R.color.gray));
        getNavigationBar().setNavItemNameIconPadding(4);
        getNavigationBar().setPaddingTopBottomDp(8,8);


    }
}
